package com.week.controller;

import com.week.entity.SysUser;
import com.week.service.UserService;
import org.apache.catalina.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.week.result.Result;

@RestController
@RequestMapping("/user")
public class UserController {

    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    @PostMapping("/findOne/{tel}")
    public Result<SysUser> findOne(@PathVariable("tel") String tel){
        return  Result.success(userService.findOne(tel));
    }



}
